.f-menu {
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 30px;
    list-style: none;
    border-bottom: $menu-border-width solid $menu-border-color;
    box-shadow: $menu-box-shadow;

    .f-menu-item {
        border-bottom: $menu-item-active-border-width solid transparent;
        padding: $menu-item-padding-y $menu-item-padding-x;
        cursor: pointer;
        transition: $menu-transition;

        &:hover,
        &.focus {
            text-decoration: none;
        }

        &.f-is-disabled {
            color: $menu-item-disabled-color;
            pointer-events: none;
            cursor: default;
        }

        &.f-is-active,
        &:hover {
            color: $menu-item-active-color;
            border-bottom: $menu-item-active-border-width solid $menu-item-active-color;
        }
    }
}

// 垂直排列
.f-menu-vertical {
    flex-direction: column;
    border-bottom: 0;
    border-right: $menu-border-width solid $menu-border-color;

    .f-menu-submenu {

        // 子菜单标题
        .f-submenu-title {
            cursor: pointer;
            padding: $menu-item-padding-y $menu-item-padding-x;

            .arrow-icon {
                margin-left: 5px;
                transition: $menu-transition;
            }
        }

        border-left: $menu-item-active-border-width solid transparent;

        // 选择的子菜单标题高亮
        &.f-is-active {
            .f-submenu-title {
                color: $menu-item-active-color;
            }
        }

        &.f-is-opened {
            .arrow-icon {
                transform: rotate(180deg);
            }
        }

        &:hover {
            border-left: $menu-item-active-border-width solid $menu-item-active-color;


        }

        // 子菜单
        .f-submenu {
            display: none;

            &.opened {
                display: block;
            }

            // 子菜单的item无左边border
            .f-menu-item {
                list-style: none;

                &:hover {
                    border-left: $menu-item-active-border-width solid transparent;
                }
            }
        }
    }

    .f-menu-item {
        border-left: $menu-item-active-border-width solid transparent;
        border-bottom: 0;

        &.f-is-active {
            border-bottom: 0;
        }

        &:hover {
            border-bottom: 0;
            border-left: $menu-item-active-border-width solid $menu-item-active-color;
        }
    }
}

// 水平排列
.f-menu-horizontal {
    .f-menu-submenu {
        position: relative;
        border-bottom: $menu-item-active-border-width solid transparent;
        padding: $menu-item-padding-y $menu-item-padding-x;
        cursor: pointer;
        transition: $menu-transition;

        &.f-is-disabled {
            color: $menu-item-disabled-color;
            pointer-events: none;
            cursor: default;
        }

        &.f-is-active,
        &:hover {
            color: $menu-item-active-color;
            border-bottom: $menu-item-active-border-width solid $menu-item-active-color;

            .arrow-icon {
                transform: rotate(180deg);
            }
        }

        .arrow-icon {
            margin-left: 5px;
            transition: $menu-transition;
        }

        .opened.f-submenu {
            position: absolute;
            display: block;
            left: 0;
            top: 40px;

            .f-is-active {
                color: $menu-item-active-color;
            }
        }

        .f-submenu {
            display: none;

            .f-menu-item {
                color: initial;
                list-style: none;
                border-bottom: none;

                &:hover {
                    color: $menu-item-active-color;
                }
            }
        }
    }
}